package com.xczl.demo.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 订单类
 * 
 * @author DMJ
 *
 */
public class Order {

	/**
	 * 构造函数
	 */
	public Order() {
		this.detail = new ArrayList<OrderDetail>();
	}

	/**
	 * 未支付
	 */
	public static final int STATE_UNPAID = 1;

	/**
	 * 支付
	 */
	public static final int STATE_PAID = 2;

	/**
	 * 完成
	 */
	public static final int STATE_COMPLETED = 3;

	private int orderId;

	private int userId;

	private Date createTime;

	private BigDecimal totalPrice;

	private int state;

	private List<OrderDetail> detail;

	/**
	 * 订单ID
	 * 
	 * @return
	 */
	public int getOrderId() {
		return orderId;
	}

	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	/**
	 * 用户ID
	 * 
	 * @return
	 */
	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	/**
	 * 创建时间
	 * 
	 * @return
	 */
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 总金额
	 * 
	 * @return
	 */
	public BigDecimal getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	/**
	 * 状态
	 * 
	 * @return
	 */
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	/**
	 * 订单明细
	 * 
	 * @return
	 */
	public List<OrderDetail> getDetail() {
		return detail;
	}

	public void setDetail(List<OrderDetail> detail) {
		this.detail = detail;
	}

}
